<template>
  <div class="c-CloudPrint">
    <div class="item-list">
      <div
        class="item"
        v-for="(lanyaPrint,index) in lanyaPrintList"
      ><span>{{ lanyaPrint.deviceId }}</span><a @click="doAdd(lanyaPrint)">添加</a></div>
    </div>
    <div class="item-list yitianjia">
      <div v-for="(print,index) in printList">
        <div class="item">
          <div><span>{{ print.deviceName }}</span><span class="yitianjia">已添加</span></div>
        </div>
        <div class="item">
          <a
            style="float: left"
            @click="doTest(print)"
          >测试打印</a><a @click="doDel(print)">删除</a><a @click="doEdit(print)">编辑名称</a>
        </div>
      </div>
    </div>
    <!-- 没有更多数据 -->
    <div class="no-data">亲，没有更多了～</div>
    <div style="margin-left: 8px">
      <p style="margin-bottom: 10px">温馨提示：</p>

      <p>1、支持云打印机：佳博CL421D；</p>
      <p>2、扫描云打印机上的二维码，添加云打印机；</p>
      <p>3、手机与云打印机都处于联网状态时，选择云打印机进行打单
        如提示不可用，请重启云打印机；</p>
      <p> 3、如有问题，请<a class="service">联系客服</a></p>
    </div>
    <div
      class="foot"
      @click="search"
    >{{ btnTitle }}
    </div>
  </div>
</template>

<script>
/**
 * * CloudPrint
 */
export default {
  name: "CloudPrint",

  data() {
    return {
      btnTitle: "搜索云打印机",
      _discoveryStarted: false,
      printList: [],
      lanyaPrintList: []
    };
  },
  onLoad() {
    this.lanyaPrintList = [
      {
        deviceId: "kyukukuku",
        deviceName: "设备"
      },
      {
        deviceId: "ukuikukuikyjtyut",
        deviceName: "设备"
      }
    ];
    this.printList = [
      {
        deviceId: "adsasdazxczxczxzxcz",
        deviceName: "设备"
      }
    ];
  }
};
</script>
<style lang="wxss">
page {
  width: 100%;
  height: 100%;
  background-color: #f7fbff;
}
</style>

<style scoped>
/* 头部菜单 */
.nav-bar {
  width: 100%;
  height: 1rem;
  background: #fff;
  box-shadow: 0px 2px 4px 0px rgba(7, 127, 255, 0.1);
}

.nav-bar .nav-item {
  display: inline-block;
  width: 50%;
  height: 1rem;
  line-height: 1rem;
  text-align: center;
}

.nav-bar .nav-item .item-word {
  display: inline-block;
  box-sizing: border-box;
  padding: 0 5px;
  font-size: 0.28rem;
  color: #767d8f;
  height: 1rem;
}

.nav-bar .nav-item .item-word.active {
  color: #0077ff;
  border-bottom: 2px solid #0077ff;
}

.item-list {
  box-shadow: 0px 2px 4px 0px rgba(7, 127, 255, 0.1);
  margin-top: 10px;
  padding-left: 10px;
  padding-right: 10px;
  background-color: #ffffff;
}

.item {
  height: 40px;
  font-size: 15px;
  font-family: PingFang SC;
  font-weight: 500;
  background-color: #ffffff;
  line-height: 40px;
  padding-left: 8px;
  border-bottom: 1px solid #e8eaf0;
}

.item span {
  color: #373e4f;
}

.item .yitianjia {
  height: 30px;
  float: right;
  font-size: 12px;
  font-family: PingFang SC;
  font-weight: 500;
  margin-right: 8px;
}

.item a {
  height: 30px;
  float: right;
  font-size: 12px;
  font-family: PingFang SC;
  font-weight: 500;
  color: rgba(0, 119, 255, 1);
  margin-right: 8px;
}

p {
  font-size: 12px;
  font-family: PingFang SC;
  font-weight: 500;
  color: rgba(118, 125, 143, 1);
  line-height: 15px;
}

.no-data {
  color: #a3aab7;
  width: 2rem;
  height: 0.3rem;
  margin: 0 auto;
  margin-top: 0.3rem;
  text-align: center;
  font-size: 0.24rem;
  line-height: 0.26rem;
}

.foot {
  text-align: center;
  vertical-align: middle;
  width: 100%;
  height: 40px;
  position: fixed;
  bottom: 0;
  background-color: #0077ff;
  font-size: 15px;
  font-family: PingFang SC;
  font-weight: 500;
  color: rgba(255, 255, 255, 1);
  line-height: 40px;
}

/* 联系客服 */
.service {
  display: inline-block;
  color: #0077ff;
  text-decoration: none;
}
</style>
